import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import login from '../login'
import register from '@/register'
import main_Bin from "@/views/main/main_Bin";
import main_Recent from "../views/main/main_Recent";
import main_Collect from "@/views/main/main_Collect";
import main_Project from "@/views/main/main_Project";
import main_Final from "@/views/main/main_Final";
import main from "@/views/main/main";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path:'/user/info',
    name:'user',
    component: ()=>import('../views/PersonalCenter.vue')
  },{
    path:'/team/member',
    name:'teammate',
    component: ()=>import('../views/teamManagement/teammateManagement')
  },
  {
    path:'/team/invite1',
    name:'inviteByEmail',
    component: ()=>import('../views/teamManagement/inviteByEmail')
  },
  {
    path:'/team/settings',
    name:'teamSet',
    component: ()=>import('../views/teamManagement/teamSet')
  },
  {
    path: '/user/login',
    name: 'login',
    component: login
  },
  {
    path: '/user/register',
    name: 'register',
    component: register
  },{
    path: '/program/show',
    name: 'main',
    component: main
  },
  {
    path: '/program/show/4',
    name: 'mainBin',
    component: main_Bin
  },
  {
    path: '/program/show/5',
    name: 'mainRecent',
    component: main_Recent
  },
  {
    path: '/program/show/1',
    name: 'mainCollect',
    component: main_Collect
  },
  {
    path: '/program/show/2',
    name: 'mainProject',
    component: main_Project
  },
  {
    path: '/program/show/3',
    name: 'mainFinal',
    component: main_Final
  },
  {
    path:'/article/details',
    name:'articleControl',
    component: ()=>import('../views/articleControl/articleControl')
  },
  {
    path:'/article/details/edit',
    name:'articleEdit',
    component: ()=>import('../views/articleControl/articleEdit')
  },{
    path:'/msg/show',
    name:'msg',
    component: ()=>import('../views/program/msg')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
